package org.colafries.admin.querybuilder.entity;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.colafries.admin.entity.domain.DataModelConfig;
import org.colafries.admin.entity.domain.QueryParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * @author colafries
 * @version v1.0
 * @ClassName queryParamContext
 * @Description 查询参数上下文
 * @date Created in 2024/5/16
 **/
@Data
public class CustomQueryParamContext {
    @ApiModelProperty(value = "条件List")
    private List<QueryParam.Condition> conditions = Lists.newArrayList();

    @ApiModelProperty(value = "度量List")
    private List<QueryParam.Measure> measures = Lists.newArrayList();

    @ApiModelProperty(value = "维度List")
    private List<QueryParam.Dimension> dimensions = Lists.newArrayList();

    @ApiModelProperty(value = "过滤List")
    private List<QueryParam.Filter> filters = Lists.newArrayList();

    @ApiModelProperty(value = "排序List")
    private List<QueryParam.Sort> sorts = Lists.newArrayList();

    @ApiModelProperty(value = "数据模型配置Map")
    private Map<String, DataModelConfig> dataModelConfigMap = Maps.newHashMap();

    @ApiModelProperty(value = "数据模型配置List Map,key:维度/度量")
    private Map<String, List<DataModelConfig>> dataModelListMap = Maps.newHashMap();

    @ApiModelProperty(value = "数据模型配置List")
    private List<DataModelConfig> dataModelConfigList = Lists.newArrayList();

    @ApiModelProperty(value = "度量Map,key:FieldHash")
    private Map<String, QueryParam.Measure> measureMap = Maps.newHashMap();
}
